package com.semanticweb.rbac.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.json.RooJson;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord
@RooJson
public class Operations {

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "permissionOperation")
    private Set<Permissions> permissions = new HashSet<Permissions>();

    private Boolean canCreate;

    private Boolean canRead;

    private Boolean canUpdate;

    private Boolean canDelete;

    @NotNull
    private String operationName;
}
